package com.angenin.springcloud.service.impl;

import com.angenin.springcloud.dao.StorageDao;
import com.angenin.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: jxm
 * @Description:
 * @Date: 2021/4/27 11:35
 * @Version: 1.0
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {


    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("----> StorageService中扣减库存");
        storageDao.decrease(productId, count);
        log.info("----> StorageService中扣减库存完成");
    }
}

